function delay(durtion) {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
        resolve(); 
    }, durtion);
  });
}

for (let i = 0; i < 5; i++) {
   await delay(durtion) 
}
